<input type='hidden' name='switch_locale' id='switch_locale' value='<%= local_assigns[:current_locale] %>' />
<% if defined?(::Refinery::I18n) and ::Refinery::I18n.frontend_locales.many? and 
    (locales = ::Refinery::I18n.frontend_locales).present? %>
  <ul id='switch_locale_picker' class='clearfix'>
    <% locales.each do |locale| %>
      <li<%= " class='selected'" if locale.to_s == local_assigns[:current_locale].to_s %>>
        <%= link_to refinery_icon_tag("flags/#{locale}.png", :size => '48x33'),
          url_for(:switch_locale => locale) %>
      </li>
    <% end %>
  </ul>
<% end %>
